// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported KeyboardManager */
-const { Clutter, Gio, GLib, GObject, Meta, St } = imports.gi;
+const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
const ByteArray = imports.byteArray;
const Signals = imports.signals;
+const EdgeDragAction = imports.ui.edgeDragAction;
const InputSourceManager = imports.ui.status.keyboard;
const IBusManager = imports.misc.ibusManager;
const BoxPointer = imports.ui.boxpointer;
this._lastDevice = device;
this._syncEnabled();
});
+
+ const mode = Shell.ActionMode.ALL & ~Shell.ActionMode.LOCK_SCREEN;
+ const bottomDragAction = new EdgeDragAction.EdgeDragAction(St.Side.BOTTOM, mode);
+ bottomDragAction.connect('activated', () => {
+ this.open(Main.layoutManager.bottomIndex);
+ });
+ Main.layoutManager.connect('keyboard-visible-changed', (_manager, visible) => {
+ bottomDragAction.cancel();
+ bottomDragAction.set_enabled(!visible);
+ });
+ global.stage.add_action(bottomDragAction);
+
this._syncEnabled();
}
global.stage.add_action(appSwitchAction);
let mode = Shell.ActionMode.ALL & ~Shell.ActionMode.LOCK_SCREEN;
- let bottomDragAction = new EdgeDragAction.EdgeDragAction(St.Side.BOTTOM, mode);
- bottomDragAction.connect('activated', () => {
- Main.keyboard.open(Main.layoutManager.bottomIndex);
- });
- Main.layoutManager.connect('keyboard-visible-changed', (manager, visible) => {
- bottomDragAction.cancel();
- bottomDragAction.set_enabled(!visible);
- });
- global.stage.add_action(bottomDragAction);
-
let topDragAction = new EdgeDragAction.EdgeDragAction(St.Side.TOP, mode);
topDragAction.connect('activated', () => {
let currentWindow = global.display.focus_window;